/**
 * Created by Administrator on 2017/3/12 0012.
 */
import Relay from "react-relay";

export default class FindUsersByEnterpriseIdAndPidMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findUsersByEnterpriseIdAndPid }`;
    }

    getVariables() {
        return {
            argsInput: {
                enterpriseId: this.props.enterpriseId,
                pid: this.props.pid,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findUsersByEnterpriseIdAndPidPayload {
            findUsersByEnterpriseIdAndPid {
                errorCode
                value
                totalResult
                id
                token
                userModelList{
                    name
                    phone
                    uid
                }
               
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
            fragment on findUsersByEnterpriseIdAndPidPayload {
                findUsersByEnterpriseIdAndPid {
                    errorCode
                    value
                    totalResult
                    id
                    token
                    userModelList{
                        name
                        phone
                        uid
                    }
                   
                }
                }
            `]
        }];
    }

}
